The present invention relates to a waveform data generation or storage method, a waveform data generation apparatus and a waveform data storage medium which are suitable for use in tone synthesis based on software of a personal computer and the like.
Systems for generating a tone waveform using a general-purpose personal computer have been proposed by the assignee of the present invention (e.g., in Japanese Patent Laid-open Publication No. HEI-10-124060). In the proposed tone waveform generation system, waveform data are sequentially generated, on a frame-by-frame basis (typically, each frame has a 10-msec time length), via a CPU of the personal computer on the basis of MIDI data. The thus-generated waveform data are then read out, on the frame-by-frame basis, via a DMA controller and then converted via a D/A converter into analog signals to be audibly reproduced or sounded.
However, in a situation where a complex algorithm is used to generate waveform data or where the CPU has an insufficient processing capability, necessary arithmetic operations to generate the waveform data can not be completed within a corresponding frame, which would make it impossible to generate a tone waveform. Such limitations are due to the fact that the conventional techniques are arranged to generate waveform data based on real-time generation principles, without specifically distinguishing between real-time generation and non-real-time generation.
It is therefore an object of the present invention to provide a waveform data generation or storage method, waveform data generation apparatus and waveform data storage medium which can generate a tone waveform in optimal condition corresponding to an available processing capability by appropriately generating waveform data while specifically distinguishing between real-time generation and non-real-time generation of the waveform data.
In order to accomplish the above-mentioned object, the present invention provides an improved method of generating waveform data on the basis of performance information, which comprises: a waveform data generation step of generating waveform data for fixed or variable sections on the basis of performance information; a step of receiving a first or second command; a step of validating performance information in real time, when the first command is received; a step of, when the first command is received, issuing an instruction to the waveform data generation step for performing real-time generation of waveform data for each of the sections on the basis of the performance information validated in real time, in accordance with a generation start condition that predetermined timing has arrived; a step of, when the first command is received, reproducing the waveform data for each of the sections generated in real time by the waveform data generation step in response to the instruction; a step of, when the second command is received, issuing an instruction for performing non-real-time generation of waveform data for each of the sections, in accordance with a generation start condition that processing by the waveform data generation step has already been completed for a preceding section; a step of, when the second command is received, validating, in non-real time, performance information corresponding to each of the sections for which the non-real-time generation of waveform data is instructed; and a step of, when the second command is received, storing, into memory, waveform data generated by the waveform data generation step on the basis of the performance information validated in non-real time.
When the waveform data is to be reproduced in real time on the basis of the performance information, for example, a reproduction instruction is given as the first command. In response to the reproduction instruction, the performance information is validated (i.e., made effective) in real time. Namely, the performance information is generated in accordance with the real time of a reproductive performance of a desired music piece. In this case, based on a generation start condition that predetermined timing has arrived, an instruction is given to the waveform data generation step for generating waveform data of each of the sections on the basis of the performance information validated in real time. As known in the art of the software tone generators, waveform data for a single time section may be generated collectively, or waveform data for each one of several sub-time sections divided from such a time section may be generated collectively. The thus-generated waveform data is then buffered as appropriate and reproduced at a predetermined reproduction sampling frequency. In this way, the waveform data generated on the basis of the performance information validated in real time can be reproduced in real time.
When, on the other hand, the waveform data generated on the basis of the performance information is to be merely stored into memory without being reproduced in real time, for example, a storage instruction is given as the second command. In response to this storage instruction, the performance information is validated or made effective in non-real time. Namely, the performance information is generated, for example, quickly or sometimes intermittently without following the real time progression of the reproductive performance of the desired music piece, in accordance with availability or processing conveniences of a processor without being influenced by time-related limitations. In this case, a waveform generation instruction is issued to the waveform data generation step, in accordance with a generation start condition or criteria that processing by the waveform data generation step has already been completed, i.e., generation of waveform data to be generated by then has already been completed, so as to instruct the waveform data generation step to perform non-real time generation of waveform data for a next section. The waveform data generated for each of the sections in non-real time on the basis of the performance information validated or made effective in non-real time is then stored into memory. By virtue of the nature of the non-real time processing, the waveform generation can be performed without being adversely influenced by time-related limitations. Therefore, all the necessary waveform generation processing can be carried out without any significant time-related limitations (for example, where a plurality of waveform generation processing modules are available, all of them can be utilized), which permits high-accuracy and high-quality waveform data generation.
According to another aspect of the present invention, there is provided a method of generating waveform data for each of fixed or variable sections on the basis of performance information, which comprises: a plurality of waveform data generation steps of generating waveform data using respective ones of different generation schemes based on performance information; a step of receiving a first or second command; a step of selecting one of the plurality of waveform data generation steps, depending on which one of the first and second commands is received; a step of, when the first command is received, instructing the selected waveform data generation step to generate waveform data for each of the sections, in accordance with a generation start condition that predetermined timing has arrived; and a step of, when the second command is received, instructing the selected waveform data generation step to generate waveform data for each of the sections, in accordance with a generation start condition that processing by the waveform data generation step has already been completed for a preceding section.
Because the waveform data generation responsive to the second command is performed in accordance with the generation start condition or criteria that the waveform data generation has already been completed for a preceding section, it can be prevented from being influenced by the time-related limitations, just as in the afore-mentioned method. Therefore, such a waveform data generation step, for example, more complicated, i.e., more time-consuming, can be selected in response to the second command. Because of the arrangement that one of the waveform data generation steps, using an optimal generation scheme, can be selectively performed depending on a distinction between various waveform-data-generation-start conditions, the present invention constantly achieves efficient waveform data generation processing.
According to still another aspect of the present invention, there is provided a method of generating waveform data on the basis of performance information and storing the generated waveform data, which comprises: a step of generating waveform data in real time on the basis of performance information and simultaneously reproducing the generated waveform data; a step of stopping reproduction of the waveform data halfway through the reproduction and specifying a stop position in the performance information; a step of generating, in non-real time, the waveform data corresponding to the performance information for a portion following the stop position; and a step of storing, into memory, the waveform date reproduced in non-real time.
In this method, the waveform generation can be changed from a real-time mode to a non-real time mode during the course of the waveform reproduction. Thus, when the reproductive performance being executed in real time has progressed to a desired performance position, it can be switched to the non-real time waveform generation mode as desired, so that waveform data based on the performance information to follow that performance position can be generated with increased efficiency and accuracy, which thereby permits efficient creation of a waveform data file to be stored in memory.
According to still another aspect of the present invention, there is provided a method of generating waveform data on the basis of performance information and storing the generated waveform data, which comprises: a step of generating waveform data in non-real time on the basis of the performance information and simultaneously storing the generated waveform data into memory; a step of displaying information indicative of a position in the waveform data corresponding to the performance information where non-real time generation is being performed; a step of receiving a stop instruction halfway through the non-real time generation; and a step of stopping the non-real time generation and storage of the waveform data, when the stop instruction is received.
In this case, the stop instruction is issued when waveform data is being generated in non-real time efficiently with enhanced accuracy and being stored into memory, so that the non-real-time generation and storage can be stopped in response to the stop instruction, oppositely to the above-mentioned case. Thus, the waveform data generated up to a desired performance position can be stored in memory, which thereby permits efficient creation of a waveform data file to be stored in memory.
The present invention may be constructed and implemented not only as a method invention as mentioned above but also as an apparatus invention. The present invention may also be implemented as a program for execution by a computer, microprocessor, DSP or the like, as well as a machine-readable storage medium storing such a program. Further, the hardware implementing the present invention may partly comprise a functionally-fixed hardware device including a combination of logic circuitry and gate array or an integrated circuit, without being necessarily limited to a programmable facility such as a computer or microprocessor. Further, the tone synthesis system embodying the present invention is not limited to a personal computer so programmed as to be capable of music performance and may be in the form of a dedicated electronic musical instrument such as a keyboard instrument, karaoke apparatus, game apparatus, cellular phone or any other type of multimedia equipment.